
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>4. 快速开始 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="css/default.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="frequent.html" />
    
    
    <link rel="prev" href="panel-value.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    1. xProxy 是什么？
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="good.html">
            
                <a href="good.html">
            
                    
                    1.1 xProxy 的优势
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="charles-diff.html">
            
                <a href="charles-diff.html">
            
                    
                    1.2 与 Charles 对比
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="INSTALL.html">
            
                <a href="INSTALL.html">
            
                    
                    2. xProxy 安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    3. 面板说明
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="panel-main.html">
            
                <a href="panel-main.html">
            
                    
                    3.1 首页面板
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="panel-network.html">
            
                <a href="panel-network.html">
            
                    
                    3.2 Network 网络面板
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="panel-rule.html">
            
                <a href="panel-rule.html">
            
                    
                    3.3 Rules 规则面板
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="panel-value.html">
            
                <a href="panel-value.html">
            
                    
                    3.4 Values 值面板
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter active" data-level="1.4" data-path="start.html">
            
                <a href="start.html">
            
                    
                    4. 快速开始
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="frequent.html">
            
                <a href="frequent.html">
            
                    
                    4.1 常用功能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="fit-recore.html">
            
                <a href="fit-recore.html">
            
                    
                    4.2 适配 Recore
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="fit-go.html">
            
                <a href="fit-go.html">
            
                    
                    4.3 适配乐高
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    5. 迁移
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="ihost.html">
            
                <a href="ihost.html">
            
                    
                    5.1 iHost 迁移
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="xswitch.html">
            
                <a href="xswitch.html">
            
                    
                    5.2 xSwitch 迁移
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="charles-m.html">
            
                <a href="charles-m.html">
            
                    
                    5.3 Charles 迁移
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    6. 规则
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="rule-model.html">
            
                <a href="rule-model.html">
            
                    
                    6.1 配置方式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="rule-pattern.html">
            
                <a href="rule-pattern.html">
            
                    
                    6.2 匹配模式 pattern
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="rule-opv.html">
            
                <a href="rule-opv.html">
            
                    
                    6.3 操作值 opValue
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="rule-opp.html">
            
                <a href="rule-opp.html">
            
                    
                    6.4 匹配原则 opProtocol
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="mobile.html">
            
                <a href="mobile.html">
            
                    
                    7. 移动端接入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="qa.html">
            
                <a href="qa.html">
            
                    
                    8. 常见问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="th.html">
            
                <a href="th.html">
            
                    
                    致谢
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" >
            
                <span>
            
                    
                    反馈
            
                </span>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >4. 快速开始</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5FEB;&#x901F;&#x5F00;&#x59CB;">&#x5FEB;&#x901F;&#x5F00;&#x59CB;</h1>
<p>&#x70B9;&#x51FB; <code>&#x5F00;&#x542F;&#x4EE3;&#x7406;</code> &#x6309;&#x94AE;&#x540E;&#xFF0C;&#x76F4;&#x63A5;&#x8FDB;&#x5165; <code>Rules</code> &#x9762;&#x677F;&#x5373;&#x53EF;&#x3002; </p>
<blockquote>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x7B2C;&#x4E00;&#x6B21;&#x542F;&#x52A8;&#x4EE3;&#x7406;&#x65F6;&#xFF0C;&#x9700;&#x8981;&#x8FDB;&#x884C;&#x7CFB;&#x7EDF;&#x6388;&#x6743;&#x540E;&#x624D;&#x53EF;&#x7528;&#x3002;</p>
</blockquote>
<p>xProxy &#x7684;&#x6240;&#x6709;&#x64CD;&#x4F5C;&#x90FD;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x7C7B;&#x4F3C;&#x5982;&#x4E0B;&#x914D;&#x7F6E;&#x65B9;&#x5F0F;&#x5B9E;&#x73B0;&#xFF1A;</p>
<pre><code>pattern operatorURI
</code></pre><h5 id="pattern">pattern</h5>
<p>pattern &#x4E3A;&#x5339;&#x914D;&#x8BF7;&#x6C42;url&#x7684;&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x53EF;&#x4EE5;&#x4E3A;&#xFF1A;&#x57DF;&#x540D;&#xFF0C;&#x8DEF;&#x5F84;&#xFF0C;&#x6B63;&#x5219;&#x53CA;&#x901A;&#x914D;&#x7B26;&#x7B49;&#x7B49;&#x591A;&#x79CD;&#x5339;&#x914D;&#x65B9;&#x5F0F;&#xFF1A;</p>
<pre><code class="lang-sh"><span class="hljs-comment"># &#x57DF;&#x540D;&#x5339;&#x914D;</span>
www.example.com
<span class="hljs-comment"># &#x5E26;&#x7AEF;&#x53E3;&#x7684;&#x57DF;&#x540D;</span>
www.example.com:6666
<span class="hljs-comment"># &#x5E26;&#x534F;&#x8BAE;&#x7684;&#x57DF;&#x540D;&#xFF0C;&#x652F;&#x6301;&#xFF1A;http&#x3001;https&#x3001;ws&#x3001;wss&#x3001;tunnel</span>
http://www.example.com

<span class="hljs-comment"># &#x8DEF;&#x5F84;&#x5339;&#x914D;&#xFF0C;&#x540C;&#x6837;&#x652F;&#x6301;&#x5E26;&#x534F;&#x8BAE;&#x3001;&#x7AEF;&#x53E3;</span>
www.example.com/<span class="hljs-built_in">test</span>
https:/www.exapmle.com/<span class="hljs-built_in">test</span>
https:/www.exapmle.com:6666/<span class="hljs-built_in">test</span>

<span class="hljs-comment"># &#x6B63;&#x5219;&#x5339;&#x914D;</span>
/^https?://www\.example\.com\/<span class="hljs-built_in">test</span>/(.*)/ referer://http://www.test.com/<span class="hljs-variable">$1</span>

<span class="hljs-comment"># &#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;</span>
^www.example.com/<span class="hljs-built_in">test</span>/*** referer://http://www.test.com/<span class="hljs-variable">$1</span>
</code></pre>
<p>&#x5B8C;&#x6574;&#x5185;&#x5BB9;&#x53C2;&#x89C1;&#xFF1A;&#x5339;&#x914D;&#x6A21;&#x5F0F;&#x3002;</p>
<h5 id="operatoruri">operatorURI</h5>
<p>operatorURI &#x4E3A;&#x5BF9;&#x5E94;&#x7684;&#x64CD;&#x4F5C;&#xFF0C;&#x7531;&#x64CD;&#x4F5C; <strong>&#x534F;&#x8BAE;+&#x64CD;&#x4F5C;&#x503C;</strong> &#x7EC4;&#x6210;<code>(operatorURI = opProtocol://opValue)</code>&#xFF1A;</p>
<p><strong>opProtocol</strong>(&#x64CD;&#x4F5C;&#x534F;&#x8BAE;)&#xFF0C; &#x5BF9;&#x5E94;&#x67D0;&#x7C7B;&#x64CD;&#x4F5C;&#xFF0C;&#x5982;&#xFF1A;</p>
<pre><code class="lang-sh"><span class="hljs-comment"># &#x8BBE;&#x7F6E;&#x8BF7;&#x6C42;&#x670D;&#x52A1;&#x5668;IP--host</span>
pattern host://opValue

<span class="hljs-comment"># &#x672C;&#x5730;&#x66FF;&#x6362;--file&#x534F;&#x8BAE;</span>
pattern file://opValue
</code></pre>
<p><strong>opValue</strong>(&#x64CD;&#x4F5C;&#x503C;)&#xFF0C; &#x5BF9;&#x5E94;&#x5177;&#x4F53;&#x64CD;&#x4F5C;&#x7684;&#x53C2;&#x6570;&#x503C;&#xFF0C;&#x5982;&#xFF1A;</p>
<pre><code class="lang-sh"><span class="hljs-comment"># &#x8BBE;&#x7F6E;&#x8BF7;&#x6C42;&#x670D;&#x52A1;&#x5668;IP--host&#x534F;&#x8BAE;</span>
pattern host://127.0.0.1:6666 <span class="hljs-comment"># &#x6216; pattern 127.0.0.1:6666</span>

<span class="hljs-comment"># &#x672C;&#x5730;&#x66FF;&#x6362;--file&#x534F;&#x8BAE;</span>
pattern file:///User/<span class="hljs-built_in">test</span>/dirOrFile <span class="hljs-comment"># &#x6216; pattern /User/test/dirOrFile</span>
</code></pre>
<p>&#x5B8C;&#x6574;&#x5185;&#x5BB9;&#x53C2;&#x89C1;&#xFF1A;&#x64CD;&#x4F5C;&#x503C;&#x3002;</p>
<p><strong>pattern</strong> &#x548C; <strong>operatorURI</strong> &#x5728;&#x591A;&#x6570;&#x60C5;&#x51B5;&#x4E0B;&#x4F4D;&#x7F6E;&#x53EF;&#x4EE5;&#x8C03;&#x6362;&#xFF0C;&#x4E14;&#x652F;&#x6301;&#x7EC4;&#x5408;&#x6A21;&#x5F0F;&#xFF0C;&#x5177;&#x4F53;&#x53C2;&#x89C1;&#xFF1A;&#x914D;&#x7F6E;&#x65B9;&#x5F0F;&#x3002;</p>
<hr>
<h3 id="&#x5E38;&#x7528;&#x89C4;&#x5219;">&#x5E38;&#x7528;&#x89C4;&#x5219;</h3>
<pre><code class="lang-sh"><span class="hljs-comment"># &#x6620;&#x5C04;&#x5230;&#x8DEF;&#x5F84;</span>
https://a.com/1.js https://b.com/2.js <span class="hljs-comment"># &#x9650;&#x5B9A;&#x534F;&#x8BAE;&#x5339;&#x914D;</span>
a.com/1.js b.com/2.js <span class="hljs-comment"># &#x4E0D;&#x5199;&#x534F;&#x8BAE;&#x7684;&#x6D3B;&#xFF0C;http/https/ws/wss &#x90FD;&#x53EF;&#x5339;&#x914D;</span>

<span class="hljs-comment"># &#x6620;&#x5C04;&#x5230;&#x672C;&#x5730;&#x6587;&#x4EF6;</span>
https://a.com/1.js file:///User/zhangsan/1.js

<span class="hljs-comment"># &#x6B63;&#x5219;&#x6A21;&#x5F0F;&#x6620;&#x5C04;</span>
/https://a.com/(.*).js/ https://b.com/<span class="hljs-variable">$1</span>.js

<span class="hljs-comment"># host &#x914D;&#x7F6E;</span>
127.0.0.1 localhost
127.0.0.1 a.com b.com c.com <span class="hljs-comment"># &#x7ED1;&#x5B9A;&#x591A;&#x4E2A;&#x57DF;&#x540D;</span>
127.0.0.1:8080 a.com <span class="hljs-comment"># &#x5E26;&#x7AEF;&#x53E3;&#x7ED1;&#x5B9A;</span>

<span class="hljs-comment"># js/css/html &#x6CE8;&#x5165;</span>
http://a.com js://filepath/1.js
http://a.com css://filepath/1.css
http://a.com html://filepath/1.html

<span class="hljs-comment"># &#x624B;&#x673A;&#x7AEF;&#x8C03;&#x8BD5; Weinre &#x5DE5;&#x5177;</span>
https://m.qq.com weinre://<span class="hljs-built_in">test</span>
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="panel-value.html" class="navigation navigation-prev " aria-label="Previous page: 3.4 Values 值面板">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="frequent.html" class="navigation navigation-next " aria-label="Next page: 4.1 常用功能">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"4. 快速开始","level":"1.4","depth":1,"next":{"title":"4.1 常用功能","level":"1.4.1","depth":2,"path":"frequent.md","ref":"frequent.md","articles":[]},"previous":{"title":"3.4 Values 值面板","level":"1.3.4","depth":2,"path":"panel-value.md","ref":"panel-value.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"css/default.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"language":"zh-hans","gitbook":"*"},"file":{"path":"start.md","mtime":"2019-11-04T15:39:28.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-12-17T11:59:46.789Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

